package com.example.demo.service;

import com.example.demo.model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

@Service
public class UService {
    //@Primary
    @Bean
    public UserInfo getUserInfo1(){
        return new UserInfo(1, "zhangsan");
    }

    @Bean
    public UserInfo getUserInfo2(){
        return new UserInfo(2, "lisi");
    }
}
